package io;

import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;

/**
 * 缓冲字符输出流
 *
 * java.io.BufferedWriter和BufferedReader
 * 缓冲字符流内部也有一个数组用来块写文本数据加速
 */
public class PWDemo {
    public static void main(String[] args) throws FileNotFoundException, UnsupportedEncodingException {
        PrintWriter pw=new PrintWriter("./pw.txt","UTF-8");

        pw.println("夜空中最亮的星，能否听清。");
        pw.println("那仰望的人心底的孤独和叹息。");

        System.out.println("写出完毕！");
        pw.close();
    }
}
